<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>File: typo_permalink_with_id.rb</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



  <div id="fileHeader">
    <h1>typo_permalink_with_id.rb</h1>
    <table class="header-table">
    <tr class="top-aligned-row">
      <td><strong>Path:</strong></td>
      <td>lib/typo_permalink_with_id.rb
      </td>
    </tr>
    <tr class="top-aligned-row">
      <td><strong>Last Update:</strong></td>
      <td>Tue Oct 24 11:59:54 -0600 2006</td>
    </tr>
    </table>
  </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
README contents:
</p>
<h1>TypoPermalinkWithId</h1>
<h2>Makes articles permalinks truly &quot;perma&quot; by prefixing the id to the title</h2>
<h3>By Tim Connor <a href="http://www.timocracy.com">www.timocracy.com</a></h3>
<h3><a href="../../../MIT-LICENSE">../MIT-LICENSE</a></h3>
<h3><a href="http://code.google.com/p/typo-permalink-with-id">homepage</a></h3>
<h6>=============</h6>
<h4>Notes</h4>
<p>
Modifies article permlinks so that they are still permanent, even if the
text is edited. This is achieved by prefixing the id, thus:
<tt>/articles/:year/:month/:date/:title-separated-by-dashes</tt> becomes:
<tt>/articles/:year/:month/:date/:id-title-separated-by-dashes</tt>
</p>
<p>
If a reader browses to an old, or otherwise incorrect, title, the article
will be found by the id stub, and a permanent redirect to the new canonical
permalink will be issued. Thus permalinks can safely be edited for typos,
keyword selection, and the like.
</p>
<p>
The id prefixing is only automatically done on article creation, so you
will have to edit any old articles you want to update yourself. Any old
links will still, obviously, point to the unedited articles correctly,
since still have the same permalink. After editing they will still be
findeable by the old URL, because after checking the new style permalink,
and the id, the :title is searched as a fallback to the old scheme, and a
redirect to canonical is issued.
</p>
<p>
Thus it&#8216;s a seamless upgrade. If someone really wants I might
consider making an install.rb that will update all your old articles for
you. Just put in a request at the <a
href="http://code.google.com/p/typo-permalink-with-id/issues/list">issues_tracker</a>
</p>
<h4>Subversion layout</h4>
<p>
Due to the small size and relative simplicity of this plugin I am not
bothering to populat branches\stable or to tag official releases. I will
keep a copy tagged as &quot;r1234&quot; where &quot;1234&quot; is the
revision of Typo trunk that I developed with or tested against.
</p>
<h4>Links</h4>
<ul>
<li><a href="http://code.google.com/p/typo-permalink-with-id/">homepage</a>

</li>
<li><a href="http://typo-permalink-with-id.googlecode.com/svn/">public_svn</a>

</li>
<li><a
href="http://www.timocracy.com/articles/category/typo-permalink-with-id">blogged_at</a>

</li>
<li><a
href="http://www.notsostupid.com/blog/2006/07/07/urls-on-rails/">inspired_by</a>

</li>
</ul>

    </div>


   </div>


  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>